Ext.define("Ext.ux.form.IconCheckBox",{
	  extend: 'Ext.form.FieldContainer',
	  alias: ['widget.iconcheckboxfield', 'widget.iconcheckbox'],
	  alternateClassName: 'Ext.form.IconCheck',
	 
	    
	    initComponent: function() {
	        var me = this,
	            value = me.value;
	       
	        
	        me.callParent();
	        
	        me.getManager().add(me);
	    },
	    
	   
	    
	    getRawValue: function() {
	        var inputEl = this.inputEl && this.inputEl.dom;
	        
	        return inputEl ? inputEl.checked : this.checked;
	    },
	    
	  
	    
	    setValue: function(value) {
	        var me = this;
	        me.setRawValue(me.valueToRaw(value));
	        return me.mixins.field.setValue.call(me, value);
	    },
	    
	    getSubmitValue: function() {
	        return this.checked ? this.inputValue : null;
	    },

	    onChange: function(newVal, oldVal) {
	        var me = this,
	            ownerCt = me.ownerCt,
	            r, rLen, radio, radios;

	        me.callParent(arguments);
	        
	        if (newVal) {
	            checks = me.getManager().getByName(me.name, me.getFormId()).items;
	            rLen = checks.length;

	            for (r = 0; r < rLen; r++) {
	                check = checks[r];

	                if (check !== me) {
	                	check.updateValueFromDom();
	                }
	            }
	        }

	        if (ownerCt && ownerCt.isRadioGroup && ownerCt.simpleValue) {
	            ownerCt.checkChange();
	        }
	    },
});